package com.heima.apis.wemedia;


import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.dtos.WmChannelPageReqDto;
import com.heima.model.wemedia.dtos.WmSensitivePageReqDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {



    /**
     * 删除敏感词
     */
    @DeleteMapping("/api/v1/feign/sensitive/del/{id}")
    void delSensitive(@PathVariable Integer id);

    /**
     * 查询敏感词列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/feign/sensitive/list")
    PageResponseResult findSensitiveList(WmSensitivePageReqDto dto);

    /**
     * 查询单条敏感词
     * @param id
     * @return
     */
    @GetMapping("/api/v1/feign/sensitive/one/{id}")
    String findSensitiveOne(@PathVariable Integer id);

    /**
     * 保存敏感词
     * @param wmSensitive
     */
    @PostMapping("/api/v1/feign/sensitive/save")
    void saveSensitive(WmSensitive wmSensitive);

    /**
     * 修改敏感词
     * @param wmSensitive
     */
    @PostMapping("/api/v1/feign/sensitive/update")
    void updateSensitive(WmSensitive wmSensitive);

    /**
     * 删除频道
     * @param id
     */
    @GetMapping("/api/v1/feign/channel/del/{id}")
    ResponseResult delChannel(@PathVariable Integer id);

    /**
     * 查询频道列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/feign/channel/list")
    PageResponseResult findChannelList(@RequestBody WmChannelPageReqDto dto);

    /**
     * 查询单条频道
     * @param id
     * @return
     */
    @GetMapping("/api/v1/feign/channel/one/{id}")
    String findChannelOne(@PathVariable Integer id);

    /**
     * 频道修改
     * @param wmChannel
     */
    @PostMapping("/api/v1/feign/channel/update")
    ResponseResult updateChannel(@RequestBody WmChannel wmChannel);

    /**
     * 频道保存
     * @param wmChannel
     */
    @PostMapping("/api/v1/feign/channel/save")
    ResponseResult saveChannel(@RequestBody WmChannel wmChannel);


    /**
     * 创建自媒体账号
     * @param apUser
     */
    @PostMapping("/api/v1/feign/wmuser/save")
    void createWmUser(@RequestBody String apUser);

    /**
     * 查询文章列表
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/feign/news/list_vo")
    PageResponseResult findNewsList(@RequestBody NewsAuthDto dto);

    /**
     * 查询文章详情
     * @param id
     * @return
     */
    @GetMapping("/api/v1/feign/news/one_vo/{id}")
    ResponseResult findNewsOne(@PathVariable Integer id);

    /**
     * 自媒体文章人工审核失败
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/feign/news/auth_fail")
    ResponseResult authFailNews(@RequestBody NewsAuthDto dto);


    /**
     * 自媒体文章人工审核成功
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/feign/news/auth_pass")
    ResponseResult authPassNews(@RequestBody NewsAuthDto dto);



}
